<template>
<div>
  <el-form :inline="true">
     <el-form-item >
        <el-button
          type="primary"
          @click="flush"
          icon="export"
        >重新汇总</el-button>
      </el-form-item>
    </el-form>
  <BrowseDataList :cate="cate" :cols="cols"
  :name="name" />
</div>
</template>
<script>
import { setSaveAfter2019 } from "@/api/案例分析.js";
import { showLoading, hideLoading } from "@/utils/loading"
import BrowseDataList from "@/components/BrowseDataList";
import { getUser } from "@/utils/auth";
import {getCxqk} from "@/api/辍学情况汇总表.js"
export default {
  components: {
    BrowseDataList
  },
  data() {
    return {
      cate: "A10-2-2辍学情况汇总表",
      name: '10.2.2 辍学情况汇总表',
      cols: [
        { label: "在校生总数(人)", prop: "ZXSZS" },
        { label:'辍学率',
              data:[
                  {label:'辍学数(人)',prop:'CXL_RS'},
                  {label:'比例(%)',prop:'CXL_BL'},
                   ]
            },
         { label: "其中",
          data: [
            {
              label: "贫困",
              data: [
                { label: "人数", prop: "YPKCXS" },
                { label: "比例(%)", prop: "YPKCXBL" }
              ]
            },
            {
              label: "学困",
              data: [
                { label: "人数", prop: "YXKCXS" },
                { label: "比例(%)", prop: "YXKCXBL" }
              ]
            },
            {
              label: "厌学",
              data: [
                { label: "人数", prop: "YYXCXS" },
                { label: "比例(%)", prop: "YYXCXBL" }
              ]
            },
            {
              label: "厌教",
              data: [
                { label: "人数", prop: "YYJCXS" },
                { label: "比例(%)", prop: "YYJCXBL" }
              ]
            },
            {
              label: "其他",
              data: [
                { label: "人数", prop: "QTYYCXS" },
                { label: "比例(%)", prop: "QTYYCXBL" }
              ]
            }
                ]
            }
            ]
    }
  },
 
    methods: {
     async flush() {
    try {
      showLoading();
      var user = getUser();
      await setSaveAfter2019(user.XXID, user.CJPC);
      hideLoading();
    } catch (e) {
      this.$alert(e);
    }
  }, 
 async fetchData() {
    var user = getUser();
 	  var datas = await getCxqk(user.XXID,user.CJPC);
    return datas;
},
    
  }
};
</script>
<style>
</style>